﻿using Rookey.Frame.EntityBase;
using Rookey.Frame.EntityBase.Attr;
using ServiceStack.DataAnnotations;
using System;

namespace Rookey.Demo.Model
{
    /// <summary>
    /// 供应商信息
    /// </summary>
    [ModuleConfig(Name = "供应商信息", PrimaryKeyFields = "Code", TitleKey = "Code", Sort = 1, StandardJsFolder = "Supplier")]
    public class Srm_SupplierInfo : SrmEntity
    {
        /// <summary>
        /// 供应商编码
        /// </summary>
        [FieldConfig(Display = "供应商编码", GroupName = "基本信息", IsUnique = true, RowNum = 1, ColNum = 1, IsRequired = true, HeadSort = 1)]
        [StringLength(50)]
        public string Code { get; set; }

        /// <summary>
        /// 供应商名称
        /// </summary>
        [FieldConfig(Display = "供应商名称", GroupName = "基本信息", ControlWidth = 490, RowNum = 1, ColNum = 2, IsRequired = true, HeadSort = 2)]
        [StringLength(200)]
        public string Name { get; set; }

        /// <summary>
        /// 供应商简称
        /// </summary>
        [FieldConfig(Display = "供应商简称", GroupName = "基本信息", RowNum = 2, ColNum = 1, HeadSort = 3)]
        [StringLength(200)]
        public string Alias { get; set; }

        /// <summary>
        /// 英文名称
        /// </summary>
        [FieldConfig(Display = "英文名称", GroupName = "基本信息", ControlWidth = 490, RowNum = 2, ColNum = 2, HeadSort = 4)]
        [StringLength(400)]
        public string EName { get; set; }

        /// <summary>
        /// 供应商类型
        /// </summary>
        [FieldConfig(Display = "供应商类型", GroupName = "基本信息", RowNum = 3, ColNum = 1, HeadSort = 5)]
        [StringLength(20)]
        public string SupplierType { get; set; }

        /// <summary>
        /// 供应商等级
        /// </summary>
        [FieldConfig(Display = "供应商等级", GroupName = "基本信息", RowNum = 3, ColNum = 2, HeadSort = 6)]
        [StringLength(20)]
        public string SupplierLevel { get; set; }

        /// <summary>
        /// 供应商地址
        /// </summary>
        [FieldConfig(Display = "供应商地址", GroupName = "基本信息", ControlWidth = 840, RowNum = 4, ColNum = 1, HeadSort = 7)]
        [StringLength(400)]
        public string Address { get; set; }

        /// <summary>
        /// 联系人
        /// </summary>
        [FieldConfig(Display = "联系人", GroupName = "联系信息", RowNum = 5, ColNum = 1, HeadSort = 8)]
        [StringLength(50)]
        public string Contact { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [FieldConfig(Display = "联系电话", GroupName = "联系信息", RowNum = 5, ColNum = 2, HeadSort = 9)]
        [StringLength(20)]
        public string ContactTel { get; set; }

        /// <summary>
        /// 手机
        /// </summary>
        [FieldConfig(Display = "手机", GroupName = "联系信息", RowNum = 5, ColNum = 3, HeadSort = 10)]
        [StringLength(15)]
        public string ContactMobile { get; set; }

        /// <summary>
        /// Email
        /// </summary>
        [FieldConfig(Display = "电子邮箱", GroupName = "联系信息", RowNum = 6, ColNum = 1, HeadSort = 11)]
        [StringLength(100)]
        public string ContactEmail { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        [FieldConfig(Display = "负责人", GroupName = "联系信息", ControlType = (int)ControlTypeEnum.DialogTree, RowNum = 6, ColNum = 2, HeadSort = 12, ForeignModuleName = "员工管理")]
        public Guid? OrgM_EmpId { get; set; }

        /// <summary>
        /// 负责人
        /// </summary>
        [Ignore]
        public string OrgM_EmpName { get; set; }

        /// <summary>
        /// 负责部门
        /// </summary>
        [FieldConfig(Display = "负责部门", GroupName = "联系信息", ControlType = (int)ControlTypeEnum.DialogTree, RowNum = 6, ColNum = 3, HeadSort = 13, ForeignModuleName = "部门管理")]
        public Guid? OrgM_DeptId { get; set; }

        /// <summary>
        /// 负责部门
        /// </summary>
        [Ignore]
        public string OrgM_DeptName { get; set; }

        /// <summary>
        /// 开户名称
        /// </summary>
        [FieldConfig(Display = "开户名称", GroupName = "银行信息", RowNum = 7, ColNum = 1, HeadSort = 14)]
        [StringLength(200)]
        public string AccountName { get; set; }

        /// <summary>
        /// 银行名称
        /// </summary>
        [FieldConfig(Display = "银行名称", GroupName = "银行信息", RowNum = 7, ColNum = 2, HeadSort = 15)]
        [StringLength(50)]
        public string BankName { get; set; }

        /// <summary>
        /// 银行账户
        /// </summary>
        [FieldConfig(Display = "银行账户", GroupName = "银行信息", RowNum = 7, ColNum = 3, HeadSort = 16)]
        [StringLength(50)]
        public string BankAccount { get; set; }

        /// <summary>
        /// 银行地址，开户银行地址
        /// </summary>
        [FieldConfig(Display = "银行地址", GroupName = "银行信息", ControlWidth = 840, RowNum = 8, ColNum = 1, HeadSort = 17)]
        [StringLength(50)]
        public string BankAddr { get; set; }

        /// <summary>
        /// Swift Code
        /// </summary>
        [FieldConfig(Display = "Swift Code", GroupName = "其他", RowNum = 9, ColNum = 1, HeadSort = 18)]
        [StringLength(100)]
        public string SwiftCode { get; set; }

        /// <summary>
        /// CHIPS No
        /// </summary>
        [FieldConfig(Display = "CHIPS No", GroupName = "其他", RowNum = 9, ColNum = 2, HeadSort = 19)]
        [StringLength(100)]
        public string CHIPSNo { get; set; }
    }
}
